from flask import Flask
#redirect_to='/new'  # 重定向


app = Flask(__name__)
app.config.from_object('settings.DevelopmentConfig')

@app.route('/old', methods=["GET", "POST"], redirect_to='/new')
def old():
    return'old function'

@app.route('/new', methods=["GET", 'POST'])
def nes():
    return 'new function'

if __name__ == '__main__':
    app.run()